package com.lcj.crawler;

import com.geccocrawler.gecco.annotation.*;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;

@Gecco(matchUrl = "http://job.hnw.net/jobs/jobs-list.php?page={currentPage}", pipelines = { "saveCompanyRecruit"})
public class NextPageZzz4 implements HtmlBean {

    @RequestParameter
    private int currentPage;

    @Request
    private HttpRequest request;

    //最后一页
    @Href
    @HtmlField(cssPath = ".page > li:nth-last-child(2) > a")
    private String lastPageUrl;

    @HtmlField(cssPath = ".hot_pos > li")
    private List<CompanyRecruit> companyRecruits;

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public List<CompanyRecruit> getCompanyRecruits() {
        return companyRecruits;
    }

    public void setCompanyRecruits(List<CompanyRecruit> companyRecruits) {
        this.companyRecruits = companyRecruits;
    }

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    public String getLastPageUrl() { return lastPageUrl; }

    public void setLastPageUrl(String lastPageUrl) { this.lastPageUrl = lastPageUrl; }

}
